package com.eastseeway.radioproject.entities;


import androidx.annotation.Keep;

import struct.ArrayLengthMarker;
import struct.StructClass;
import struct.StructField;
@Keep
@StructClass
public  class BaseTCPBean {
    @StructField(order = 0)
    private int address;

    @StructField(order = 1)
    private byte[] placeHolder1 = new byte[6];

    @StructField(order = 2)
    private byte length = 64;

    @StructField(order = 3)
    private byte[] content = new byte[64];

    @StructField(order = 4)
    private byte[] placeHolder2 = {0x01,0x01,0x00,0x00,0x00};


    public int getAddress() {
        return address;
    }

    public void setAddress(int address) {
        this.address = address;
    }

    public byte getLength() {
        return length;
    }

    public void setLength(byte length) {
        this.length = length;
    }

    public byte[] getContent() {
        return content;
    }

    public void setContent(byte[] content) {
        if (content.length > 64) {
            return;
        }
        System.arraycopy(content, 0, this.content, 0, content.length);
//        this.content
//        this.content = content;
    }

    public byte[] getPlaceHolder1() {
        return placeHolder1;
    }

    public void setPlaceHolder1(byte[] placeHolder1) {
        this.placeHolder1 = placeHolder1;
    }

    public byte[] getPlaceHolder2() {
        return placeHolder2;
    }

    public void setPlaceHolder2(byte[] placeHolder2) {
        this.placeHolder2 = placeHolder2;
    }
}
